package com.study.java.oop;

public class Ren {
    private String name;
    private short nianLing;

    public String xuehao;


    // q,,
    public Ren(String nam,short nianLi, int h){
        this.name = nam;
        this.nianLing = nianLi;
    }

    public Ren(String nam,short nianLi){
        this.name = nam;
        this.nianLing = nianLi;
    }


    public void chiFan(){
        if (nianLing>1){
            System.out.println("可以吃饭!");
        } else {
            System.out.println("去睡觉！");
        }
    }

    public static void main(String [] args){
        Ren Ren = new Ren("Azez", (short) 20,5);
        Ren.chiFan();
    }

}
